# $LastChangedDate: 2010-01-28 23:56:22 -0500 (Thu, 28 Jan 2010) $
# Author:	Jim E. Brooks  http://www.palomino3d.org
# Desc:		Top-level makefile.
# Notes:	Parallel make is supported.
#           Using "&&" between make -C ensures dependent subdirs are made first.
#           "+ $(makeall)" suppresses the "Add + to parent make rule" warning.
# =============================================================================

# Include project-specific definitions.
include GNUmakefile_defs

define MAKE_ALL
	$(MAKE) -C base $@ &&\
	$(MAKE) -C threads $@ &&\
	$(MAKE) -C math $@ &&\
	$(MAKE) -C graphics $@ &&\
	$(MAKE) -C lua_bind $@ &&\
	$(MAKE) -C shader $@
endef

define CLEAN
	@+ $(MAKE_ALL)
	@rm -f core core.* *.core vgcore* gmon.out *.gmon .gdb_history
	@rm -f $(OUT_DIR)/*base_bits*
endef

all .DEFAULT:
	+ $(MAKE_ALL)

clean realclean:
	+ $(MAKE_ALL)
	$(CLEAN)
